import { Controller, UseGuards } from '@nestjs/common';
import { Crud } from 'nestjs-mongoose-crud'
import { Action } from '@lib/db/models/action.model';
import { InjectModel } from 'nestjs-typegoose';
import { ModelType } from '@typegoose/typegoose/lib/types';
import { ApiUseTags, ApiBearerAuth } from '@nestjs/swagger';
import { AuthGuard } from '@nestjs/passport';

@Crud({
  model: Action
})
@Controller('actions')
@ApiUseTags('活动')
@UseGuards(AuthGuard('jwt'))
@ApiBearerAuth()
export class ActionController {
  constructor(
    @InjectModel(Action) private readonly model: ModelType<Action>
  ) { }
}
